<script setup lang="ts">
import router from '@/router'

function handleLogin() {
  router.push({ name: 'Home' })
}
</script>

<template>
  <div class="min-h-screen flex items-center justify-center bg-gray-100">
    <div class="w-full max-w-sm px-8 py-6 bg-white rounded-lg shadow-lg">
      <h2 class="text-xl font-bold text-center text-gray-700 mb-6">登录</h2>

      <el-form
        ref="loginFormRef"
        label-width="auto"
        label-position="top"
        require-asterisk-position="right"
        size="large"
      >
        <!-- 用户名输入框 -->
        <el-form-item label="用户名">
          <el-input placeholder="请输入用户名"></el-input>
        </el-form-item>

        <!-- 密码输入框 -->
        <el-form-item label="密码">
          <el-input type="password" placeholder="请输入密码"></el-input>
        </el-form-item>

        <!-- 登录按钮 -->
        <el-form-item>
          <el-button class="w-full" type="primary" @click="handleLogin">登录</el-button>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<style scoped></style>
